<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="AsyncCommand,nimbus.commands.AsyncCommand,EXECUTION_CANCELED,EXECUTION_COMPLETE,message,dispatchExecutionComplete,execute" name="keywords">
<title>nimbus.commands.AsyncCommand</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'AsyncCommand - Nimbus';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Nimbus</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?nimbus/commands/AsyncCommand.html&amp;nimbus/commands/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;AsyncCommand</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class AsyncCommand"); titleBar_setSubNav(true,true,false,false,true,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">nimbus.commands</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class AsyncCommand</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">AsyncCommand <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="ICommand.html">ICommand</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subclasses</td><td><a href="../commands/AsyncMacroCommand.html">AsyncMacroCommand</a>, <a href="../commands/BlockingCommand.html">BlockingCommand</a></td>
</tr>
</table>
<p></p>
  An abstract command class that supports Asynchronous commands through dispatching
  the ExecutionComplete event upon completion of the commands processing.
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#message">message</a> : String = "null"<div class="summaryTableDescription">
   A brief summary of what the current command is doing.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#AsyncCommand()">AsyncCommand</a>()</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#execute()">execute</a>():void</div>
<div class="summaryTableDescription">
   Used to execute the command.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#dispatchExecutionComplete()">dispatchExecutionComplete</a>(canceled:Boolean = false):void</div>
<div class="summaryTableDescription">
   To be called when the asynchronous action has been completed, and is used to notify
   any listeners that the command has completed.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
</table>
</div>
<a name="eventSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Events</div>
<table id="summaryTableEvent" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Event</th><th>Summary</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:executionCanceled">executionCanceled</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">
  Dispatched when the command execution is completed, but with errors.</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:executionComplete">executionComplete</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">
  Dispatched when the command execution is completed, and the asynchronous
  action performed by the command was completed successfully.</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#EXECUTION_CANCELED">EXECUTION_CANCELED</a> : String = "executionCanceled"<div class="summaryTableDescription">[static]
   Event dispatched when command execution is complete, but with errors.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#EXECUTION_COMPLETE">EXECUTION_COMPLETE</a> : String = "executionComplete"<div class="summaryTableDescription">[static]
   Event dispatched when command execution is complete.</div>
</td><td class="summaryTableOwnerCol">AsyncCommand</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="message"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">message</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var message:String = "null"</code><p>
   A brief summary of what the current command is doing. For example, in a new project
   command the message might be: "Creating a new Project". 
   </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="AsyncCommand()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">AsyncCommand</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function AsyncCommand()</code>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="dispatchExecutionComplete()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">dispatchExecutionComplete</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>protected function dispatchExecutionComplete(canceled:Boolean = false):void</code><p>
   To be called when the asynchronous action has been completed, and is used to notify
   any listeners that the command has completed.
   
   </p><p>Two possible events are dispatched by this method: <code>AsyncCommand.EXECUTION_COMPLETE</code>
   and <code>AsyncCommand.EXECUTION_CANCELED</code>, signifying that the asynchronous action
   was allowed to complete successfully, or was cancelled, either by a failure,
   or user-interaction.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">canceled</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; If <code>true</code> causes an <code>EXECUTION_CANCELED</code> event
        to be dispatched. 
   
   </td>
</tr>
</table>
</div>
<a name="execute()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">execute</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function execute():void</code><p>
   Used to execute the command. All commands should implement this method, and override it.
   If the <code>execute()</code> is not overridden, an error will be thrown.
   </p><p>When overriding the method, do not call <code>super.execute()</code>, as doing so
   will throw an error.</p>
   </div>
<div class="detailSectionHeader">Event detail</div>
<a name="event:executionCanceled"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">executionCanceled</td><td class="detailHeaderType">event&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href="../commands/AsyncCommand.html"><code>nimbus.commands.AsyncCommand</code></a>
<br>
<p></p><p>
  Dispatched when the command execution is completed, but with errors. This differs from the
  <code>EXECUTION_COMPLETE</code> event in that while the command was executed,
  the asynchronous action to be performed by the command did not execute
  successfully. The failure may be due to connectivity issues, user-interaction, etc.
  
  </p><p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../commands/AsyncCommand.html#dispatchExecutionComplete()" target="">dispatchExecutionComplete()</a>
</div>
</div>
<a name="event:executionComplete"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">executionComplete</td><td class="detailHeaderType">event&nbsp;</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href="../commands/AsyncCommand.html"><code>nimbus.commands.AsyncCommand</code></a>
<br>
<p></p><p>
  Dispatched when the command execution is completed, and the asynchronous
  action performed by the command was completed successfully. ("Successfully"
  meaning that it performed any loading or other async. actions. You may
  not have received the results you wanted or expected.)
  
  </p><p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../commands/AsyncCommand.html#dispatchExecutionComplete()" target="">dispatchExecutionComplete()</a>
</div>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="EXECUTION_CANCELED"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">EXECUTION_CANCELED</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const EXECUTION_CANCELED:String = "executionCanceled"</code><p>
   Event dispatched when command execution is complete, but with errors. 
   </p></div>
<a name="EXECUTION_COMPLETE"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">EXECUTION_COMPLETE</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const EXECUTION_COMPLETE:String = "executionComplete"</code><p>
   Event dispatched when command execution is complete.
   </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
